﻿using MyWeb.Extensions.AOP;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SqlSugar;

namespace MyWeb.Extensions.ServiceExtensions.Sqlsugar
{
    [SugarTable("TableModifyHistory")]
    public class TableModifyHistory
    {
        /// <summary>
        /// Key
        /// </summary>
        [SugarColumn(IsNullable = false, IsPrimaryKey = true)]
        public long Id { get; set; }
        /// <summary>
        /// 操作表名
        /// </summary>
        [SugarColumn(IsNullable = true,ColumnDescription ="操作表名")]
        public string TableName { get; set; } = string.Empty;
        /// <summary>
        /// 操作表主键Id
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDescription = "操作表主键Id")]
        public string TablePKId { get; set; } = string.Empty;
        /// <summary>
        /// 操作类型
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDescription = "操作类型")]
        public string ModifyType { get; set; } = string.Empty;
        /// <summary>
        /// 操作人
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDescription = "操作人")]
        public string UserName { get; set; } = string.Empty;
        /// <summary>
        /// 执行的SQL语句
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDescription = "执行的SQL语句")]
        public string DiffSql { get; set; } = string.Empty;
        /// <summary>
        /// 执行的参数
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDescription = "执行的参数")]
        public string DiffParam { get; set; } = string.Empty;
        /// <summary>
        /// 业务数据
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDescription = "业务数据")]
        public string BusinessData { get; set; } = string.Empty;
        /// <summary>
        /// 执行用时
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDescription = "执行用时")]
        public double ExecutionTime { get; set; }
        /// <summary>
        /// 操作时间
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDescription = "操作时间")]
        public DateTime? ModifyDate { get; set; }
        /// <summary>
        /// 操作数据
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDescription = "操作数据")]
        public string ModifyHistory { get; set; } = string.Empty;
    }
}
